This notebook presents isobaric labeling data analysis strategy that includes data-driven normalization.

We will check how varying analysis components [summarization/normalization/differential abundance testing methods] changes end results of a quantitative proteomic study.

1 Unit component

1.1 log2 transformation of reporter ion intensities

2 Normalization component

2.1 CONSTANd

2.2 NOMAD

We apply NOMAD on the PSM level instead of the peptide level.

## Running normalization with  464224  number of data points
## Normalizing for factor:  Peptide 
## Normalizing for factor:  Run 
## Normalizing for factor:  iTRAQ 
## Normalizing for factor:  Run Peptide 
## Normalizing for factor:  Run iTRAQ

2.3 medianSweeping

TO DO: - remove next code block i changed parameter values to avoid errors in subsequent code blocks

3 Summarization component

Summarize quantification values from PSM to peptide (first step) to protein (second step).

3.1 Median summarization (PSM to peptide to protein)

Notice that the row sums are not equal to Ncols anymore, because the median summarization does not preserve them (but mean summarization does).

Let’s also summarize the non-normalized data for comparison in the next section.

4 QC plots

4.1 Boxplots:

4.2 MA plots:

MA plots of two single samples taken from condition 1 and condition 0.125, measured in different MS runs (samples Mixture2_1:127C and Mixture1_2:129N, respectively).

MA plots of all samples from condition 1 and condition 0.125 (quantification values averaged within condition).

4.3 CV (coefficient of variation) plots:

4.4 PCA plots:

4.4.1 Using all proteins

4.4.2 Using spiked proteins only

4.5 HC (hierarchical clustering) plots:

Only use spiked proteins

TO DO: - also use short label names like in PCA plot - unify the list of args across pcaplot.ils and dendrogram.ils. Make sure labeling and color picking is done in the same location (either inside or outside the function)

5 DEA component

5.1 Moderated t-test

TODO: - Also try to log-transform the intensity case, to see if there are large differences in the t-test results. - done. remove this code? NOTE: - actually, lmFit (used in moderated_ttest) was built for log2-transformed data. However, supplying untransformed intensities can also work. This just means that the effects in the linear model are also additive on the untransformed scale, whereas for log-transformed data they are multiplicative on the untransformed scale. Also, there may be a bias which occurs from biased estimates of the population means in the t-tests, as mean(X) is not equal to exp(mean(log(X))).

6 Results comparison

Confusion matrix:

Confusion matrix for variant: CONSTANd
contrast background spiked
not DEA 0.667 4064 0
DEA 0.667 15 4
not DEA 0.125 4061 3
DEA 0.125 5 14
not DEA 1 4059 5
DEA 1 5 14
0.667 0.125 1
Accuracy 0.9963262 0.9980407 0.9975508
Sensitivity 0.2105263 0.7368421 0.7368421
Specificity 1.0000000 0.9992618 0.9987697
PPV 1.0000000 0.8235294 0.7368421
NPV 0.9963226 0.9987703 0.9987697
Confusion matrix for variant: NOMAD
contrast background spiked
not DEA 0.667 4064 0
DEA 0.667 19 0
not DEA 0.125 4064 0
DEA 0.125 15 4
not DEA 1 4064 0
DEA 1 17 2
0.667 0.125 1
Accuracy 0.9953466 0.9963262 0.9958364
Sensitivity 0.0000000 0.2105263 0.1052632
Specificity 1.0000000 1.0000000 1.0000000
PPV NaN 1.0000000 1.0000000
NPV 0.9953466 0.9963226 0.9958344
Confusion matrix for variant: raw
contrast background spiked
not DEA 0.667 4064 0
DEA 0.667 19 0
not DEA 0.125 4064 0
DEA 0.125 15 4
not DEA 1 4064 0
DEA 1 17 2
0.667 0.125 1
Accuracy 0.9953466 0.9963262 0.9958364
Sensitivity 0.0000000 0.2105263 0.1052632
Specificity 1.0000000 1.0000000 1.0000000
PPV NaN 1.0000000 1.0000000
NPV 0.9953466 0.9963226 0.9958344

Scatter plots:

Volcano plots:

Violin plots:

Let’s see whether the spiked protein fold changes make sense

7 Conclusions

8 Session information

## R version 4.0.3 (2020-10-10)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.5 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=de_BE.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=de_BE.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=de_BE.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=de_BE.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] dendextend_1.14.0  NOMAD_0.99.0       dplR_1.7.1         CONSTANd_0.99.0   
##  [5] forcats_0.5.0      stringr_1.4.0      dplyr_1.0.2        purrr_0.3.4       
##  [9] readr_1.4.0        tidyr_1.1.2        tibble_3.0.4       tidyverse_1.3.0   
## [13] kableExtra_1.3.1   psych_2.0.9        gridExtra_2.3      RColorBrewer_1.1-2
## [17] stringi_1.5.3      limma_3.45.19      caret_6.0-86       ggplot2_3.3.2     
## [21] lattice_0.20-41   
## 
## loaded via a namespace (and not attached):
##  [1] nlme_3.1-149         matrixStats_0.57.0   fs_1.5.0            
##  [4] lubridate_1.7.9      webshot_0.5.2        httr_1.4.2          
##  [7] tools_4.0.3          backports_1.1.10     R6_2.4.1            
## [10] rpart_4.1-15         mgcv_1.8-33          DBI_1.1.0           
## [13] colorspace_1.4-1     nnet_7.3-14          withr_2.3.0         
## [16] tidyselect_1.1.0     mnormt_2.0.2         compiler_4.0.3      
## [19] cli_2.1.0            rvest_0.3.6          xml2_1.3.2          
## [22] labeling_0.4.2       scales_1.1.1         digest_0.6.26       
## [25] R.utils_2.10.1       rmarkdown_2.5        pkgconfig_2.0.3     
## [28] htmltools_0.5.0      highr_0.8            dbplyr_1.4.4        
## [31] rlang_0.4.8          readxl_1.3.1         rstudioapi_0.11     
## [34] farver_2.0.3         generics_0.0.2       jsonlite_1.7.1      
## [37] R.oo_1.24.0          ModelMetrics_1.2.2.2 magrittr_1.5        
## [40] Matrix_1.2-18        Rcpp_1.0.5           munsell_0.5.0       
## [43] fansi_0.4.1          viridis_0.5.1        R.methodsS3_1.8.1   
## [46] lifecycle_0.2.0      pROC_1.16.2          yaml_2.2.1          
## [49] MASS_7.3-53          plyr_1.8.6           recipes_0.1.14      
## [52] grid_4.0.3           blob_1.2.1           parallel_4.0.3      
## [55] crayon_1.3.4         haven_2.3.1          splines_4.0.3       
## [58] hms_0.5.3            tmvnsim_1.0-2        knitr_1.30          
## [61] pillar_1.4.6         reshape2_1.4.4       codetools_0.2-16    
## [64] stats4_4.0.3         XML_3.99-0.5         reprex_0.3.0        
## [67] glue_1.4.2           evaluate_0.14        data.table_1.13.2   
## [70] modelr_0.1.8         png_0.1-7            vctrs_0.3.4         
## [73] foreach_1.5.1        cellranger_1.1.0     gtable_0.3.0        
## [76] assertthat_0.2.1     xfun_0.18            gower_0.2.2         
## [79] prodlim_2019.11.13   broom_0.7.2          e1071_1.7-4         
## [82] class_7.3-17         survival_3.2-7       viridisLite_0.3.0   
## [85] timeDate_3043.102    signal_0.7-6         iterators_1.0.13    
## [88] lava_1.6.8           ellipsis_0.3.1       ipred_0.9-9